<template>
  <div class="tm-main-container">
    <transition name="slide-left-in">
      <div v-if="show" class="tm-start-btn" @click="openApps">
        <i class="el-icon-menu"></i>
      </div>
    </transition>
  </div>
</template>

<script>
export default {
  name: 'App',
  data () {
    return {
      show: true
    }
  },
  mounted () { },
  methods: {
    openApps () {
      this.show = false
      this.$modal
        .drawer('TmAppList', {
          props: {
            width: 260,
            title: '应用'
          }
        })
        .once('cancel', (action) => {
          if (action === 'close') {
            this.show = true
          }
        })
    }
  }
}
</script>
